<template>
  <div>
    <FootTableListItem
      v-for="item in todayList"
      :foodItem="item"
      :key="item.menu_id"
    />
  </div>
  <!--空状态-->
  <div v-if="todayList.length <= 0">
    <van-empty description="暂未发布" />
  </div>
</template>

<script>
import FootTableListItem from "./FootTableListItem";
import { ref } from "vue";
import { getOrdering } from "../../../api/ordering";
export default {
  name: "OrderLunch",
  components: { FootTableListItem },
  setup() {
    //数据
    const todayList = ref([]);
    getOrdering().then((res) => {
      // console.log(res);
      todayList.value = res.data.filter((item) => item.menu_type == "中");
    });
    return { todayList };
  },
};
</script>

<style scoped></style>
